package com.empire.module.spider.dal.mysql.lotteryfootballmatchsporttery;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.spider.dal.dataobject.lotteryfootballmatchsporttery.LotteryFootballMatchSportteryDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.spider.controller.app.lotteryfootballmatchsporttery.vo.*;

/**
 * 足球竞猜 Mapper
 *
 * @author 无敌
 */
@Mapper
public interface LotteryFootballMatchSportteryMapper extends BaseMapperX<LotteryFootballMatchSportteryDO> {

    default PageResult<LotteryFootballMatchSportteryDO> selectPage(AppLotteryFootballMatchSportteryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<LotteryFootballMatchSportteryDO>()
                .betweenIfPresent(LotteryFootballMatchSportteryDO::getBusinessDate, reqVO.getBusinessDate())
                .likeIfPresent(LotteryFootballMatchSportteryDO::getHomeTeamAbbName, reqVO.getHomeTeamAbbName())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getHomeTeamId, reqVO.getHomeTeamId())
                .likeIfPresent(LotteryFootballMatchSportteryDO::getAwayTeamAbbName, reqVO.getAwayTeamAbbName())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getAwayTeamId, reqVO.getAwayTeamId())
                .likeIfPresent(LotteryFootballMatchSportteryDO::getLeagueAbbName, reqVO.getLeagueAbbName())
                .betweenIfPresent(LotteryFootballMatchSportteryDO::getMatchDate, reqVO.getMatchDate())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getMatchNum, reqVO.getMatchNum())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getMatchNumStr, reqVO.getMatchNumStr())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getMatchStatus, reqVO.getMatchStatus())
                .betweenIfPresent(LotteryFootballMatchSportteryDO::getMatchTime, reqVO.getMatchTime())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getSellStatus, reqVO.getSellStatus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getSpfBonus, reqVO.getSpfBonus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getRspfBonus, reqVO.getRspfBonus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getTtgBonus, reqVO.getTtgBonus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getBqcBonus, reqVO.getBqcBonus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getCrsBonus, reqVO.getCrsBonus())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getSpfSingle, reqVO.getSpfSingle())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getRspfSingle, reqVO.getRspfSingle())
                .eqIfPresent(LotteryFootballMatchSportteryDO::getGoalLine, reqVO.getGoalLine())
                .betweenIfPresent(LotteryFootballMatchSportteryDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(LotteryFootballMatchSportteryDO::getMatchId));
    }

}
